package com.tengju.bff.interfaces.covercharge.constant;

/**
 * 收益类型枚举
 *
 * @author zhaoyi
 */
public enum LetaxRegisteredStatusEnum {

    TO_APPLY_FOR(0, "待申请"),
    REGISTRATION_COMPLET(1, "注册完成"),
    CONNECTION_FAILURE(2, "关联失败"),
    TERMINATION_OF(3, "终止"),
    IN_APPLICATION(4, "申请中"),
    IN_REGISTER(5, "注册中"),
    REGISTRATION_FAIL(6, "注册失败"),
    STAY_AUTH(7,"待授权");

    private Integer code;
    private String desc;

    LetaxRegisteredStatusEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getDesc() {
        return this.desc;
    }

    public static LetaxRegisteredStatusEnum getStatusDesc (Integer code){
        for(LetaxRegisteredStatusEnum thisEnum : (LetaxRegisteredStatusEnum.values())){
            if(thisEnum.getCode().equals(code)){//如果传入的code与此枚举code相同，则返回此枚举
                return thisEnum;
            }
        }
        return null;
    }

}
